RedotMgr = {};

local redotFunDic = {};

function RedotMgr:updateRedot(redotType)
    local redotState = RedotMgr:getRedotState(redotType);
    Dispatcher:dispatch(RedotType.LoginBtnRedot, redotState);
end

function RedotMgr:getRedotState(redotType)
    local fun = redotFunDic[redotType];
    if not fun then
        Utils.log("未注册红点：" .. redotType);
        return;
    end
    return fun[1](table.unpack(fun[2]));
end

function RedotMgr:registRedotType(redotType, fun, ...)
    redotFunDic[redotType] = { fun, { ... } };
end